﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>流程审批</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Cache-Control" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <link href="/CSS/bootstrap3.3.5/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="/CSS/Base/BaseClass.css" rel="stylesheet" type="text/css" />
    <link href="/JqueryPlug/dtGrid/jquery.dtGrid.css" rel="stylesheet">
    <link href="/CSS/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet">
    <script src="/Scripts/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="/JqueryPlug/layer/layer/layer.js"></script>
    <script src="/Scripts/avalon.min.js"></script>
    <script src="/Scripts/SZHLCommon.js"></script>
    <script src="/JqueryPlug/dtGrid/jquery.dtGrid.js"></script>
    <script>

        var grid, dtoption, viewindex;

        //获取主要菜单
        dtoption = {
            lang: 'zh-cn',
            check: false,
            ajaxLoad: false,
            exportFileName: '审批列表',
            columns: [
                { id: 'ID', title: '序号', type: 'string', columnClass: 'text-center', hide: true },
                { id: 'ShenQingRen', title: '姓名', type: 'string', columnClass: 'text-center' },
            { id: 'LeiBie', title: '类别', type: 'string', columnClass: 'text-center' },
                { id: 'Content', title: '内容', type: 'string', columnClass: 'text-center' },
                { id: 'CRDate', title: '创建时间', type: 'string', columnClass: 'text-center' },
                {
                    id: 'Option', title: '审批状态', type: 'string', columnClass: 'text-center', resolution: function (value, record, column, grid, dataNo, columnNo) {
                        var content = ComFunJS.getSPStatus(record.SPStatus, record.SPStatus1, record.isforbid);
                        return content;
                    }
                }],
            gridContainer: 'dtgrid',
            toolbarContainer: 'dtgridTool',
            pageSize: 10,
            pageSizeLimit: [10, 20, 50],
            tools: 'faseQuery',
            onGridComplete: function (grid) {
                var log = '<p>表格加载完成。表格编号：' + grid.option.id + '。</p>';
            }

        };

        var model = avalon.define({
            $id: "APP_LCSP",
            addLCSP: function () {
                parent.ComFunJS.winviewform("/View/APPBaseView/APP_ADD.html?FormCode=LCSPADD&FrameName=frameLCSP", "添加数据", "1000", "600");
            },
            curSPType: "",
            SPTypeData: [],
            CommonData: [],
            SearchContent: "",
            GetSPDataList: function () {
                $.getJSON('/API/FTAPI.ashx?Action=GETMYLCSPLIST', { P1: model.curSPType, P2: model.SearchContent }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        model.CommonData = resultData.Result;
                        if (dtoption.datas != undefined) {
                            dtoption.originalDatas = model.CommonData;

                        } else {
                            dtoption.datas = model.CommonData;
                            grid = $.fn.DtGrid.init(dtoption);
                        }
                        grid.load()
                    }
                })

            }
        });
        avalon.ready(function () {
            //获取主要菜单
            $.getJSON('/API/FTAPI.ashx?Action=GETCOLUMNLIST', { P1: 10 }, function (resultData) {
                if (resultData.ErrorMsg == "") {
                    model.SPTypeData = resultData.Result;
                    model.GetSPDataList();

                }
            })
        })

    </script>

</head>
<body ms-controller="APP_LCSP">
    <div class="container-fluid maindiv" style="margin-top: 20px" id="dvContent">

        <div style="width:200px;position:absolute">
            <div class="panel panel-default">
                <div class="panel-body text-center">
                    <a href="#" id="btADD" ms-click="addLCSP()" style=" height: 34px;line-height: 34px;" class="button button-glow button-border button-rounded button-primary"><i class="fa fa-plus"></i>添加流程</a>
                </div>
            </div>
            <div class="list-group ">
                <a href="/View/APPBaseView/APP_LCSP.html" class="list-group-item active" style="padding-left: 15px"><span class="glyphicon glyphicon-list-alt"></span>&nbsp;&nbsp;我填写的流程</a>
                <a href="/View/APPBaseView/APP_LCSP_SP.html" class="list-group-item" style="padding-left: 15px"><span class="glyphicon glyphicon-list-alt"></span>&nbsp;&nbsp;审批列表</a>
                <a href="/View/APPBaseView/APP_LCSP_BranchList.html" class="list-group-item" style="padding-left: 15px"><span class="glyphicon glyphicon-list-alt"></span>&nbsp;&nbsp;部门流程列表</a>
            </div>
        </div>
        <div class="row contentdv" style="margin-left:201px">
            <div class="col-xs-12 ">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="row">

                            <div class="col-xs-10">
                                <div class="input-group">
                                    <div class="input-group-addon">查询条件</div>
                                    <select class="form-control" ms-duplex="curSPType" ms-change="GetSPDataList()" style="width:30%">
                                        <option value="">全部审批类型</option>
                                        <option ms-attr-value="item.TypeNO" ms-repeat-item="SPTypeData">{{item.TypeNO}}</option>
                                    </select>
                                    <input id="tbSearch" style="width:70%" ms-duplex="SearchContent" class="form-control" type="text" placeholder="输入请假内容查询" />
                                    <span class="input-group-btn">
                                        <button class="btn btn-info" ms-click="GetSPDataList()">查询</button>
                                    </span>
                                </div>
                            </div>
                            <div class="col-xs-2">
                            </div>
                        </div>
                    </div>
                </div>
                <div id="dtgrid" style="margin-top:20px"></div>
                <div id="dtgridTool" class="dt-grid-toolbar-container"></div>
            </div>
        </div>
    </div>
</body>
</html>
